﻿using UnityEngine;
using System.Collections;

public class ArtificialLight : MonoBehaviour
{
    private bool bLightOn = false;

    // Update is called once per frame
    void Update()
    {
        if (Clock.iHour == 7)
            bLightOn = false;

        if (Clock.iHour == 18)
            bLightOn = true;

        if (bLightOn == true)
            gameObject.transform.GetChild(0).GetComponent<Light>().intensity = 0.5f;
        else
            gameObject.transform.GetChild(0).GetComponent<Light>().intensity = 0.0f;
    }
}
